﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.IO;
using System.ComponentModel;

namespace CoolCode.Web.Mvc.UI
{
    public interface IHtmlWriter
    {
        HtmlHelper Html { get; }
        AjaxHelper Ajax { get; }
    }

    public static class IHtmlWriterExtensions
    {
        [EditorBrowsable(EditorBrowsableState.Never)] //hide from intellisense in fluent interface 
        public static TextWriter GetInnerWriter(this IHtmlWriter writer)
        {
           return  writer.Html.ViewContext.HttpContext.Response.Output;
        }
    }
}
